﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:gd="clr-namespace:WickedFlame.GenDock">
    
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/VecDraw.GenDock;component/Resources/Brushes.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <!--CollapsibleAnchorButton-->
    <Style TargetType="{x:Type gd:CollapsibleAnchorButton}">
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type gd:CollapsibleAnchorButton}">
                    <Border BorderBrush="Gray" BorderThickness="1,1,0,0" CornerRadius="0" Background="{StaticResource AnchorButtonNormalBackground}" Name="btnBorder">
                        <Border BorderBrush="DarkGray" BorderThickness="0,0,1,1" CornerRadius="0" Name="btnShadowBorder">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>

                                <!--<gd:AlignedImage Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">-->
                                <Viewbox Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2">
                                    <ContentPresenter x:Name="Icon"
													VerticalAlignment="Center"
													ContentSource="Icon"
                                                    HorizontalAlignment="Center"
													SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </Viewbox>
                                <!--</gd:AlignedImage>-->
                                <ContentPresenter x:Name="Title"
												    Grid.Column="1"
                                                    Grid.Row="0"
													Margin="0,0,2,0"
													VerticalAlignment="Center"
													ContentSource="Title"
                                                    HorizontalAlignment="Right"
													SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Grid>
                        </Border>
                    </Border>

                    <ControlTemplate.Triggers>
                        
                        <Trigger Property="IsMouseOver"
								 Value="true">
                            <Setter Property="Background"
									Value="{StaticResource AnchorButtonSelectedBackground}" TargetName="btnBorder"/>
                            <Setter Property="BorderBrush"
                                    Value="DarkGray" TargetName="btnBorder" />
                            <Setter Property="BorderBrush"
                                    Value="Black" TargetName="btnShadowBorder" />
                        </Trigger>
                        
                        <Trigger Property="IsPressed"
								 Value="true">
                            <Setter Property="Background"
									Value="{StaticResource AnchorButtonSelectedBackground}" TargetName="btnBorder"/>
                            <Setter Property="BorderBrush"
                                    Value="DarkGray" TargetName="btnBorder" />
                            <Setter Property="BorderBrush"
                                    Value="Black" TargetName="btnShadowBorder" />
                        </Trigger>
                        
                        <!--<Trigger Property="IsSelected"
								 Value="true">
                            <Setter Property="Background"
									Value="{StaticResource AnchorButtonSelectedBackground}" TargetName="btnBorder"/>
                            <Setter Property="BorderBrush"
                                    Value="DarkGray" TargetName="btnBorder" />
                            <Setter Property="BorderBrush"
                                    Value="Black" TargetName="btnShadowBorder" />
                        </Trigger>-->
                        
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>
    
</ResourceDictionary>